package hr.ctg.service.dao;

import hr.ctg.domain.model.Telefon;
import hr.jpa.dao.GenericDAOImpl;

import java.util.List;

import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;

@AutoCreate
@Name("telefonDAO")
public class TelefonDAO extends GenericDAOImpl<Telefon, Integer> {
	@SuppressWarnings("unchecked")
	public List<Telefon> findByIdObjekta(final Integer idObjekta) {
		return entityManager.createNamedQuery("Telefon.findByIdObjekta")
				.setParameter(1, idObjekta).getResultList();
	}
}
